package com.tensai.study.java.basic.datastructure.enmus;

/**
 * @author Tensai
 */

public enum Meal {

	APPETIZER(Food.Appetizer.class),
	MAINCOURSE(Food.MainCourse.class),
	DESSERT(Food.Dessert.class),
	COFFEE(Food.Coffee.class);


	private final Food[] values;

	Meal(Class<? extends Food> kind) {
		//通过class对象获取枚举实例
		values = kind.getEnumConstants();
	}

	public static void main(String[] args) {
//        System.out.println(Meal.values());
	}

	public interface Food {
		enum Appetizer implements Food {
			SALAD, SOUP, SPRING_ROLLS
		}

		enum MainCourse implements Food {
			LASAGNE, BURRITO, PAD_THAI,
			LENTILS, HUMMOUS, VINDALOO
		}

		enum Dessert implements Food {
			TIRAMISU, GELATO, BLACK_FOREST_CAKE,
			FRUIT, CREME_CARAMEL
		}

		enum Coffee implements Food {
			BLACK_COFFEE, DECAF_COFFEE, ESPRESSO,
			LATTE, CAPPUCCINO, TEA, HERB_TEA
		}
	}
}

